package com.suzhe.ymall.product.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.suzhe.ymall.common.enums.MessageStatusEnum;
import com.suzhe.ymall.product.mapper.MessageLogMapper;
import com.suzhe.ymall.product.pojo.MessageLog;
import com.suzhe.ymall.product.service.IMessageLogService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 本地消息表 服务实现类
 * </p>
 *
 * @author suzhe
 * @since 2019-08-29
 */
@Service
public class MessageLogServiceImpl extends ServiceImpl<MessageLogMapper, MessageLog> implements IMessageLogService {

    @Override
    public void updateMeesageStatus(String messageId, MessageStatusEnum messageStatusEnum) {
        MessageLog messageLog = new MessageLog();
        messageLog.setId(messageId);
        messageLog.setStatus(messageStatusEnum.value());
        updateById(messageLog);
    }
}
